package org.virbraligo.vboxjavaservice.gui.validator;

import javax.swing.JComponent;
import javax.swing.JTextField;

public class NotEmptyValidator implements Validator{

	public String validate(JComponent comp) {
		String result = null;
		String content = ((JTextField) comp).getText().trim();
		if(content.equals("")){
			result = "Not Empty!";
			comp.requestFocus();
		}
		return result;
	}

}
